package com.itheima.code;

import com.itheima.code.dto.OrderDTO;
import com.itheima.code.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {
    @Autowired
    private IOrderService orderService;

    @GetMapping("/order")
    public String getOrder(@RequestBody  OrderDTO orderDTO){
        return orderService.handle(orderDTO);
    }
}
